#!/bin/sh

. /etc/utils.sh

case "$1" in
  start)
    if has-tuneable-laser; then
      echo "Starting lasertune."
      babysit 5 lasertune 2>&1 | logos lasertune &
    fi
    ;;
  stop)
    pkillwait -x lasertune
    ;;
  restart)
    $0 stop; $0 start
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    ;;
esac

